package com.usian.user.controller;

import com.usian.user.service.UserService;
import com.usian.yygh.common.result.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.HashMap;

/**
 * @Author:WGG
 * @Date 2023年01月05日 23:07
 */
//@CrossOrigin
@Api(tags = "用户登录接口")
@RestController
@RequestMapping("/admin/user/")
public class LoginController {

    @Autowired
    private UserService userService;

    @ApiOperation(value = "登录")
    @PostMapping("/login")
    public Result loginUser(@RequestBody HashMap<String,String> map){
        return userService.loginUser(map);
    }


}
